package com.iwayin.core.dao.commentditto;

import com.iwayin.core.dao.BaseDAOImpl;
import com.iwayin.core.dataobject.CommentDittoDO;

public class CommentDittoDAOImpl extends BaseDAOImpl implements CommentDittoDAO {

	@Override
	public void addCommentDitto(CommentDittoDO commentDitto) {
		this.executeInsert("CommentDittoDAO.addCommentDitto", commentDitto);

	}
	
	@Override
	public boolean isAddDittoComment(CommentDittoDO commentDittoDO) {
		Integer count = (Integer) this.getSqlMapClientTemplate().queryForObject("CommentDittoDAO.findCommentDitto", commentDittoDO);
		if (count > 0) {
			return true;
		}
		return false;
	}
	
	@Override
	public void deleteCommentDitto(CommentDittoDO commentDitto) {
		this.executeDelete("CommentDittoDAO.deletCommentDitto", commentDitto);
		
	}
}
